/*
 *  Copyright (C) 2011 glauco
 * 
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 * 
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.balisunrise.common.listeners;

import java.util.EventListener;
import org.balisunrise.common.Event;

/**
 * Listener de ações e eventos da transação.
 * Existem outros eventos em outros listener como TransactionActionsListener e
 * TransactionModeListener.
 *
 * @author glauco
 * @see org.balisunrise.common.listeners.TransactionActionsListener
 * @see org.balisunrise.common.listeners.TransactionModeListener
 */
public interface TransactionListener extends EventListener {

    /**
     * Evento disparado antes de validar a entidade para salvar.
     * @param evt
     */
    public void beforeValidade(Event evt);

    /**
     * Evento disparado antes de salvar, depois de validar.
     * @param evt
     */
    public void beforeSave(Event evt);

    /**
     * Evento disparado depois de salvar.
     * @param evt
     */
    public void afterSave(Event evt);

    /**
     * Evento disparado antes de excluir uma entidade.
     * @param evt
     */
    public void beforeDelete(Event evt);

    /**
     * Evento disparado depois de excluir uma entidade.
     * @param evt
     */
    public void afterDelete(Event evt);
}
